PID controller
One general purpose PID controller is provided as shown in the diagram below. The sample rate for the PID controller is always 4ms.